//
//  LevelBaseLayer.h
//  FruitCrush
//
//  Created by gaoyu on 15/7/26.
//
//

#ifndef __FruitCrush__LevelBaseLayer__
#define __FruitCrush__LevelBaseLayer__

#include "cocos2d.h"
#include "MonsterView.h"
#include "TimeBarView.h"
#include "CrushView.h"
#include "OptionMenuView.h"
#include "PlayLevelRecorder.h"
#include "StartPromptView.h"
#include "EndPromptView.h"

USING_NS_CC;

class LevelBaseLayer : public cocos2d::Layer
{
public:
    int  m_level;
    int  monsterType;
    bool *bad_matrix;
    bool *bad_matrixUp;
    bool *jelly_Matrix;
    bool *bad_matrixProtectCover;
    bool *bad_matrixBlank;
    int  m_bombNum;
    LevelBaseLayer();
    ~LevelBaseLayer();
    bool baseInit();
private:
    bool m_isPause;
    MonsterView *monsterView;
    TimeBarView *timeBarView;
    CrushView *crushView;
    OptionMenuView *optionMenuView;
    StartPromptView* startPromptView;
    EndPromptView* endPromptView;
    void bgInit();
    void startPromptViewInit();
    void endPromptViewShow(bool success);
    void monsterViewInit();
    void timeBarViewInit();
    void crushViewInit();
    void pauseMenuInit();
    void attackMonster(int type);
    void crushCallback(Ref *sender);
    void crushBadStateCallback(Ref *sender);
    void crushCoverStateCallback(Ref *sender);
    void monsterViewCallback(Ref *sender);
    void timeBarViewCallback(Ref *sender);
    void optionMenuViewInit();
    void menuCallback(Ref *sender);
    void startPromptViewCallback(Ref *sender);
    void monsterViewBossAttackCallbackFun(Ref *sender);
    
};

#endif /* defined(__FruitCrush__LevelBaseLayer__) */
